import os
import traceback
from tkinter import messagebox

import Logger
import Menu
from Data import GlobalValue

if __name__ == "__main__":
    # 配置logger
    logger = Logger.logger_config(GlobalValue.log_address, "ClassAffairs")

    # 对全局的报错进行捕获，并打印报错信息
    try:
        # 进入菜单
        Menu.menu()
    except:
        os.system('cls')
        logger.error(traceback.format_exc())
        messagebox.showerror('错误', "发生了异常，请查看日志文件")
